var app=new Vue({
    el:"#app",
    data:{
        password:"",
        password2:""
    },
    methods:{
        reseted:function () {
            if(this.password!=this.password2){
                alert("两次密码不相同！");
            }else{
                axios.post("/ResetMyPassword?password="+this.password)
                    .then(function (response) {
                        if(response.code==500){
                            console.log(response);
                            alert("重置密码失败");
                        }else{
                            alert("重置成功，即将跳转到登录页面");
                            window.location.href='/login';
                        }
                    },function (err) {
                        console.log(err);
                        alert("请求失败");
                    })
            }
        }
    }
})